#include <iostream>
#include <time.h>
#include "Game.h"
/*Constructeur global du jeu*/
void main()
{
	bool gameOver = false;

	std::cout << " _____________ " << std::endl;
	std::cout << "|" << char(3) << "           " << char(4) <<"|" << std::endl;
	std::cout << "|  Blackjack  |" << std::endl;
	std::cout << "|" << char(5) << "___________" << char(6) << "|" << std::endl;
	std::cout << " " << std::endl;
	//std::cout << "Appuyez sur 1. pour jouer." << std::endl;
	//std::cout << "Appuyez sur une autre touche pour quitter." << std::endl;

	
	game blackjack;
	InitializeGame(blackjack);
	do
	{
		Play(blackjack);
	} while (gameOver == false);

	if (blackjack.gameTable.players[0].score > blackjack.gameTable.players[1].score && blackjack.gameTable.players[0].score <= 21)
	{
		std::cout << "Le joueur 1 a gagne!" << std::endl;
	}
	else if (blackjack.gameTable.players[1].score > blackjack.gameTable.players[0].score && blackjack.gameTable.players[1].score <= 21)
	{
		std::cout << "Le joueur 2 a gagne!" << std::endl;
	}
	else
	{
	std:cout << "Match Nul!" << std::endl;
	}
	return;
}

